package com.jhc.common.core.context;

import cn.dev33.satoken.stp.StpUtil;
import com.jhc.api.constant.Constant;
import com.jhc.api.domain.User;


public class UserContextHolder {
    public static Long getUserId(){
        return getCurrUser().getId();
    }

    public static User getCurrUser(){
        return StpUtil.getSession().getModel(Constant.LOGIN_USER, User.class);
    }
}
